package com.hy.erp.inventory.pojo;

import java.io.Serializable ;
import java.util.Date ;

import javax.persistence.Column ;
import javax.persistence.Entity ;
import javax.persistence.Id ;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne ;
import javax.persistence.Table ;

import org.hibernate.annotations.Index ;
/*import org.jboss.seam.ScopeType ;
import org.jboss.seam.annotations.Name ;
import org.jboss.seam.annotations.Scope ;
*/
import com.hy.erp.inventory.dao.interfaces.IUnitsDao;
import com.hy.erp.inventory.pojo.interfaces.IUnits;
import com.hy.mydesktop.shared.persistence.domain.gxt.MyBaseModel;
//import com.hy.erp.inventory.vsoft.libra.enterprise.framework.persistence.api.annotation.DaoA;
//import com.hy.erp.inventory.vsoft.libra.enterprise.framework.persistence.entity.AbstractPersistentEntity;
/**
 * 
 * <ul>
 * <li>开发作者：李冰</li>
 * <li>设计日期：2010-10-6；时间：下午01:56:05</li>
 * <li>类型名称：Units</li>
 * <li>设计目的：单位</li>
 * </ul>
 * <ul>
 * <b>修订编号：</b>
 * <li>修订日期：</li>
 * <li>修订作者：</li>
 * <li>修订原因：</li>
 * <li>修订内容：</li>
 * </ul>
 */
@Entity
@Table(name="t_unit")
/*
@Name("units")
@Scope(ScopeType.SESSION)
@DaoA(IUnitsDao.class)
*/
//public class Units extends AbstractPersistentEntity implements IUnits
public class Units extends MyBaseModel //implements IPositonType

{

	/**
	 * <ul>
	 * <li>开发作者：李冰</li>
	 * <li>设计日期：2010-10-6；时间：下午01:56:20</li>
	 * <li>字段类型：long；字段名称：serialVersionUID</li>
	 * <li>设计目的：</li>
	 * </ul>
	 * <ul>
	 * <b>修订编号：</b>
	 * <li>修订日期：</li>
	 * <li>修订作者：</li>
	 * <li>修订原因：</li>
	 * <li>修订内容：</li>
	 * </ul>
	 */
	private static final long	serialVersionUID	=
														- 110811023993282991L ;
	

	
	public String getUnitName ( )
	{
		return this.get(IUnits.UNITNAME) ;
	}
	public void setUnitName (
								String unitName )
	{
		super.set(IUnits.UNITNAME, unitName);
	}
	/*@ManyToOne(targetEntity=UnitName.class)
	public UnitName getUnitName ( )
	{
		return this.get(IUnits.UNITNAME) ;
	}
	public void setUnitName (
								UnitName unitName )
	{
		super.set(IUnits.UNITNAME, unitName);
	}*/	
	
	@ManyToOne(targetEntity=UnitClassification.class)
	@JoinColumn(name="UnitClassification_identifier")
	public UnitClassification getUnitClassification ( )
	{
		return this.get(IUnits.UNITCLASSIFICATION) ;
	}
	public void setUnitClassification (
										UnitClassification unitClassification )
	{
		super.set(IUnits.UNITCLASSIFICATION, unitClassification);
	}
	@ManyToOne(targetEntity=Units.class)
	@JoinColumn(name="UnitType_identifier")
	public UnitType getUnitType ( )
	{
		return this.get(IUnits.UNITTYPE) ;
	}
	public void setUnitType (
			UnitType unitType )
	{
		super.set(IUnits.UNITTYPE, unitType);
	}
	
	@ManyToOne(targetEntity=UnitGroup.class)
	@JoinColumn(name="UnitGroup_identifier")
	public UnitGroup getUnitGroup ( )
	{
		return this.get(IUnits.UNITGROUNP) ;
	}
	public void setUnitGroup (
								UnitGroup unitGroup )
	{
		super.set(IUnits.UNITGROUNP, unitGroup);
	}
	@Column(name="isNormUnit",length=50)
	@Index(name="isNormUnitIndex")
	public Boolean getIsNormUnit ( )
	{
		return this.get(IUnits.ISNORMUNIT) ;
	}
	public void setIsNormUnit (
								Boolean isNormUnit )
	{
		super.set(IUnits.ISNORMUNIT, isNormUnit);
	}
	@Column(name="createDate",length=50)
	@Index(name="createDateIndex")
	public Date getCreateDate ( )
	{
		return this.get(IUnits.CREATEDATE) ;
	}
	public void setCreateDate (
								Date createDate )
	{
		super.set(IUnits.CREATEDATE, createDate);
	}
	@Column(name="description",length=50)
	@Index(name="descriptionIndex")
	public String getDescription ( )
	{
		return this.get(IUnits.DESCRIPTION) ;
	}
	public void setDescription (
									String description )
	{
		super.set(IUnits.DESCRIPTION, description);
	}
	/*@Column(name="coment",length=100)
	@Index(name="comentIndex")
	public String getComent ( )
	{
		return this.get(IUnits.COMENT) ;
	}
	public void setComent (
							String coment )
	{
		super.set(IUnits.COMENT, coment);
	}*/
	public Units ( )
	{
		super ( ) ;
	}
	
}
